#include <stdio.h>
#include "../utils/log.h"
#include <assert.h>

int main()
{
    log_debug("你好,%s", "世界");
    log_info("你好,%s", "世界");
    log_warning("你好,%s", "世界");
    log_error("你好,%s", "世界");
    log_fatal("你好,%s", "世界");
    FILE *log1_fp = fopen("log1.log", "a");
    FILE *log2_fp = fopen("log2.log", "a");
    log_add_fp(log1_fp, "test_log");
    log_add_fp(log2_fp, "test_log");
    
    log_error("log1_fp address:%p log2_fp address:%p", log1_fp, log2_fp);
    assert(log_f_debug("test_log", "你好,%s", "世界1") == 0);
    assert(log_f_info("test_log", "你好,%s", "世界2") == 0);
    assert(log_f_warning("test_log", "你好,%s", "世界3") == 0);
    assert(log_f_error("test_log", "你好,%s", "世界4") == 0);
    assert(log_f_fatal("test_log", "你好,%s", "世界5") == 0);
    fclose(log1_fp);
    fclose(log2_fp);
    return 0;
}